feat: thinking-control content type (convos.org/thinking-control:1.0) - #101
Draft
yewreeka wants to merge 1 commit into
Draft
feat: thinking-control content type (convos.org/thinking-control:1.0)#101yewreeka wants to merge 1 commit into
yewreeka wants to merge 1 commit into
Conversation
User-to-agent stop/resume requests for thinking sessions, the counterpart
of convos.org/thinking:1.0. Payload: { action: "stop" | "resume",
targetMessageId, agentInboxId }, keyed to the same (agentInboxId,
targetMessageId) session key the thinking events use. Silent like
thinking: no fallback, shouldPush false.
- ThinkingControlCodec + isThinkingControlMessage/getThinkingControlContent
in src/utils/thinkingControl.ts, registered in buildClient and exported
from the package root (subpath import works via the ./utils/* wildcard).
- agent serve: inbound messages emit a thinking_control event; a new
thinking-control stdin command sends them.
- Mirrored test suite in test/utils/thinkingControl.test.ts.
Sender side (Convos iOS) is xmtplabs/convos-ios#1053; the behavior plan
is xmtplabs/convos-assistants#2105.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the thinking-control content type,
convos.org/thinking-control:1.0— the user-to-agent counterpart ofconvos.org/thinking:1.0. Where thinking is an agent narrating its own session, a thinking-control message is any conversation member asking the agent to stop that session or resume it.Payload:
{ "action": "stop" | "resume", "targetMessageId": "<anchor message id>", "agentInboxId": "<agent inbox id>" }(agentInboxId, targetMessageId)— the same session key the thinking events use.agentInboxIddisambiguates when two agents think about the same message.shouldPushfalse, never rendered as a chat row.Changes
src/utils/thinkingControl.ts:ThinkingControlCodec,ContentTypeThinkingControl,isThinkingControlMessage,getThinkingControlContent,ThinkingControl/ThinkingControlActiontypes — mirrorsthinking.tsstructure exactly. Subpath import@xmtp/convos-cli/utils/thinkingControlworks via the existing./utils/*wildcard export.src/utils/client.ts: codec registered inbuildClient.src/index.ts: root exports.agent serve: inbound thinking-control messages emit athinking_controlevent (action,targetMessageId,agentInboxId); newthinking-controlstdin command sends them.test/utils/thinkingControl.test.ts: mirrors the thinking codec suite.Context
Testing
pnpm typecheckclean.pnpm test: 511 passed; the 3 failures (test/commands/identity.test.ts,test/commands/init.test.ts) fail identically on cleanorigin/mainin this environment (pre-existing, unrelated).🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Add
thinking-controlcontent type for agent stop/resume signalingconvos.org/thinking-control:1.0content type implemented insrc/utils/thinkingControl.tswith aThinkingControlCodecthat encodes/decodesstopandresumeactions targeting a specific message and agent inbox.buildClientand exports all related types and helpers from the package's public API.agent serveto classify inbound thinking-control messages as a distinct event type and to accept a newthinking-controlstdin command with requiredaction,targetMessageId, andagentInboxIdfields.Macroscope summarized 2c874c6.